<template>
  <div class="app-home">
    <transition
      enter-to-class="animate__animated animate__fadeIn"
      enter-active-class="animate__animated animate__fadeIn"
      leave-to-class="animate__animated animate__fadeOut"
      leave-active-class="animate__animated animate__fadeOut"
    >
      <div class="mask" v-if="isShow" @click="myHide"></div>
    </transition>

    <transition
      enter-to-class="animate__animated animate__fadeInUp"
      enter-active-class="animate__animated animate__fadeInUp"
      leave-to-class="animate__animated animate__fadeOutDown"
      leave-active-class="animate__animated animate__fadeOutDown"
    >
      <div class="fenlei" v-if="isShow">
        <ul>
          <!-- @click="bianqian" -->
          <li >
            <div class="img">
              <span></span>
            </div>
            <p>便签</p>
            <router-link to="/bianqian"> </router-link>
          </li>

          <li>
            <div class="img">
              <span></span>
            </div>
            <p>图片</p>
            <router-link to="/img"> </router-link>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>地址</p>
            <router-link to="/address"> </router-link>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>链接</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>名片</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>通知</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>统计</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>便签</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>图片</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>地址</p>
             <router-link to="/address"> </router-link>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>链接</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>名片</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>通知</p>
          </li>
          <li>
            <div class="img">
              <span></span>
            </div>
            <p>统计</p>
          </li>
        </ul>
      </div>
    </transition>
    <keep-alive>
      <router-view />
    </keep-alive>
    <!-- 便签 -->
    <!-- <bian-qian @my-child="mybianqian" v-if="isbianqian"></bian-qian> -->

    <!-- 导航 -->
    <app-footer @my-click="myRev"></app-footer>
  </div>
</template>
<script>
import AppFooter from "@/components/app-footer.vue";

export default {
  name: "Home",
  components: {
    AppFooter,
  },
  data() {
    return {
      isShow: false
    };
  },
  methods: {
    myRev(i) {
      this.isShow = i;
    },
    myHide() {
      this.isShow = false;
    }
  }
  
};
</script>

<style lang="less" scoped>
.app-home {
  height: 100%;
  width: 100%;
}
.mask {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
}
.fenlei {
  width: 100%;
  height: 340px;
  background-color: #f0f0f0;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 10000;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  ul {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 20px 10px;
    box-sizing: border-box;
    li {
      box-sizing: border-box;
      flex-basis: 25%;
      height: 80px;
      position: relative;
      padding-left: 30px;
      padding-top: 10px;
      a {
        display: block;
        position: absolute;
        width: 100%;
        height: 80px;
        top: 0;
        left: 0;
      }
      &:active {
        background-color: #e7e6e6;
      }
      .img {
        span {
          display: block;
          width: 25px;
          height: 25px;
          background-image: url(../assets/images/sprite2.png);
          background-repeat: no-repeat;
          background-size: 24px;
          background-position: -3px -3px;
        }
      }
      p {
        position: absolute;
        bottom: 7px;
        left: 0;
        font-size: 13px;
        padding-left: 30px;
      }
      &:nth-of-type(2) {
        span {
          background-position: -2px -82px;
        }
      }
      &:nth-of-type(3) {
        span {
          background-position: -2px -163px;
        }
      }
      &:nth-of-type(4) {
        span {
          background-position: -2px -240px;
        }
      }
      &:nth-of-type(5) {
        span {
          background-position: -2px -320px;
        }
      }
      &:nth-of-type(6) {
        span {
          background-position: 0px -402px;
        }
      }
      &:nth-of-type(7) {
        span {
          background-position: 0px -482px;
        }
      }
      &:nth-of-type(8) {
        span {
          background-position: -2px 0px;
        }
      }
      &:nth-of-type(9) {
        span {
          background-position: -2px -82px;
        }
      }
      &:nth-of-type(10) {
        span {
          background-position: -2px -163px;
        }
      }
      &:nth-of-type(11) {
        span {
          background-position: -2px -240px;
        }
      }
      &:nth-of-type(12) {
        span {
          background-position: -2px -320px;
        }
      }
      &:nth-of-type(13) {
        span {
          background-position: -2px -402px;
        }
      }
      &:nth-of-type(14) {
        span {
          background-position: -2px -482px;
        }
      }
    }
  }
}
</style>